#include<bits/stdc++.h>
using namespace std;

string add(string a, string b) {
	reverse(a.begin(), a.end());
	reverse(b.begin(), b.end());

	int len = max(a.size(), b.size()) + 2;

	vector<int> x(len), y(len);
	for (int i = 0; i < a.size(); i++) {
		x[i] = a[i] - '0';
	}
	for (int i = 0; i < b.size(); i++) {
		y[i] = b[i] - '0';
	}

	int t = 0, r = 0;
	string s = "";
	for (int i = 0; i < len; i++) {
		r = x[i] + y[i] + t;
		t = r / 10;
		r = r % 10;
//		cout<<i<<" : "<<r<<endl;
		s += to_string(r);
	}
	if (t)
		s += "1";
	reverse(s.begin(), s.end());
	return s;
}


string acc[100005];
int main() {

//	cout << add("123", "221") << endl;

	int cnt = 0;
	string s, s1;
	cin >> s1;
	for (int i = 0; i < s1.size(); i++) {
		if (s1[i] == '+')
			cnt++;
		else
			s += s1[i];
	}

	sort(s.begin(), s.end());

	int len = s.size();
	int aver_len = len / (cnt + 1);
	for (int i = 0; i < len;) {
		for (int j = 0; j <= cnt && i < len; j++) {
			acc[j] += s[i++];
		}
	}
//	for (int j = 0; j <= cnt; j++) {
//		cout << j << " : " << acc[j] << endl;
//	}
	for (int i = 1; i <= cnt; i++) {
		string t = add(acc[i - 1], acc[i]);
//		cout << i << " : " << t << endl;
		int idx;
		for (idx = 0; t[idx] == '0'; idx++);
		string ans(t, idx);
		acc[i] = !ans.empty() ? ans : "0";
//		cout << i << " : " << acc[i] << endl;
	}
	cout << acc[cnt];
	return 0;
}
